package collection;

import com.google.common.collect.Lists;

import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author Created by chenxin34 on 2020/3/25 下午4:51.
 */
public class ListPartitionTst {
    public static void main(String[] args) throws NoSuchMethodException {
        List<Long> list = new ArrayList<>();
//        list.add(1L);
//        list.add(2L);
//        list.add(0L);

        List<List<Long>> part = Lists.partition(list, 2);
        System.out.println(part.size());
        for (List<Long> subPage : part) {
            System.out.println(subPage.size());
            System.out.println(subPage.getClass().getName());
        }

    }
}
